#include <stdio.h>
#define MAX_NUM 3


// 新建图书book(编号、书名、作者、页数、价格)
typedef struct{
	char id[20];
	char name[20];
	char author[20];
	int page;
	double price;
	
}Book;
// 定义3本图书，数组
Book books[MAX_NUM]={
  {"ISBN 978-7-313-19918-8","《C语言程序设计》","张玉生" ,328,49.89},
  {"ISBN 978-7-313-19918-8","《C语言程序设计》"," 刘 炎" ,128,89.76},
  {"ISBN 978-7-313-19918-8","《C语言程序设计》","张玉生" ,328,88.80},
};
//显示书籍信息

void showBooks() {
	printf("\n图书列表：\n");
	for(int i=0; i<MAX_NUM; i++) {
		printf("%d. (书名：%s ，书号：%s, 作者：%s，页数：%d页，价格：%.2f 元)\n",
		i+1, books[i].name, books[i].id,
		books[i].author, books[i].page,books[i].price);
	}
}
int main(){	
   showBooks();

return 0;
}
